package cn.felord.common.service;

import cn.felord.common.entity.SysRole;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Set;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @author dax
 * @since 2018 -09-13
 */
public interface ISysRoleService extends IService<SysRole> {
    /**
     * Select roles by uri set.
     *
     * @param uri the uri
     * @return the set
     */
    Set<SysRole> selectRolesByAntPath(String uri);

    /**
     * Select user role by user id set.
     *
     * @param userId the user id
     * @return the set
     */
    Set<String> selectUserRoleByUserId(String userId);

    /**
     * Save role integer.
     *
     * @param sysRole the sys role
     * @return the integer
     */
    Integer saveRole(SysRole sysRole);

    /**
     * 权限列表查询.
     *
     * @return the set
     */
    IPage<SysRole> selectList(Page<SysRole> page);


}
